package com.group2.operations.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClient;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
@Data
public class AliyunConfig {
    private String endpoint = "oss-cn-chengdu.aliyuncs.com";
    private String accessKeyId = "LTAI5tMBQMVjSzQhJsesBDBS";
    private String accessKeySecret = "hAsKyZgX32oyPdEA1j4HMpzF3SouJM";
    private String bucketName = "contracts-storage";
    private String urlPrefix = "http://contracts-storage.oss-cn-chengdu.aliyuncs.com/";

    @Bean
    public OSS oSSClient() {
        return new OSSClient(endpoint, accessKeyId, accessKeySecret);
    }
}
